3Commas DCA Bot Indicator v1.0Introduction
The indicator attempts to implement a majority all of the settings found on the 3Commas DCA Bot setting page that can be implemented within a TradingView indicator. Specifically, it will implement the "Open new trade ASAP" and "Trading View Custom Signal" deal start conditions. In this way, you can leverage the power of TradingView's backtester to model your settings and analysis past performance as well as leverage TradingView's alert notification subsystem to send Deal Start and Close signals to 3Commas using almost any of the thousands of scripts found in the Public Library (see "What does it do and how does it do it?" section below for more information on how to do this using the RSI indicator as an example).
How is it original and useful?
This indicator is unique in that it's the only one (as of the initial publications) that can handle 28 out of 32 bot settings (88% coverage) that are found on the 3Commas bot settings page. In addition, because it is a TradingView script, you will benefit from the following:
Model your bot's configuration using the backtester on any timeframe and evaluate its performance using the chart's history.
View a table of detailed statistics pertaining to deals started and completed, win/loss rates, daily P&L, true max drawdown, and detailed statistics on bars in deal along with safety orders filled.
View a table of "Used amount for each step" as presented in 3Commas as well.
Ability to link to almost any TradingView chart indicator that provides a single data point for buy/sell signals.
Make use of the 3Commas TA Start Conditions indicator to emulate the 3Commas built-in indicators for further performance evaluation with the backtester.
How does it compare to other scripts in the Public Library?
This indicator offers a very detailed, comprehensive settings and maybe the only one (as of the initial publication) that can handle 28 out of the 32 bot settings that are found on the 3Commas bot settings page (that can be handled within TradingView, because some cannot be modeled due to chart and language constraints). Specifically, the following 3Commas bot settings and inputs are addressed with asterisks denoting specific limitation due to TradingView's platform architecture and/or constraints:
Main settings
✅ Name
❌ Exchange* (Not handled since it is inherited from chart)
⚠ Bot type* (Only Single-pair because you simply apply the indicator to as many pairs you desire in separate charts to simulate a Multi-pair setting)
Pairs
❌ Pairs* (Not handled since it is inheriting the symbol from the chart)
Strategy
✅ Strategy
❌ Profit currency* (Not handled since there is no equivalence in TradingView)
✅ Base order size / unit
✅ Safety order size / unit
✅ Start order type
Deal start condition
⚠ TradingView* (You can modify the "Technical Rating" indicator by TradingView to output a signal yourself like @TheTradingParrot has done in the TV signal for DCA backtest script)
⚠ QFL* (See Quickfingers Luc's Base Breaking Strategy v2.5 - 3Commas Edition for an alternative)
❌ Manually/API* (Not handled since there is no equivalence in TradingView)
✅ Trading View custom signal
✅ Open new trade asap
Take profit
✅ Take profit (%)
✅ Take profit type
✅ Trailing
⚠ Trailing deviation* (modified to handle TradingView's broker emulator properly)
Stop loss
✅ Stop Loss (%)
✅ Stop Loss action
⚠ Stop Loss timeout* (modified to use "bars" as the unit of measure)
Safety orders
✅ Max safety trades count (a total of 100 safety orders are supported!)
⚠ Max active safety trades count* (Not handled since there is no equivalence in TradingView)
✅ Price deviation to open safety orders (% from initial order)
✅ Safety order volume scale
✅ Safety order step scale
Advanced settings
✅ Don't start deal(s) if the daily volume is less than
✅ Minimum price to open deal
✅ Maximum price to open deal
⚠ Deal start delay (QFL and standard TV signals only)* (modified to use "bars" as the unit of measure)
✅ Cooldown between deals
✅ Open deals & stop
Close deal after timeout
⚠ The time after which, deal will be closed automatically* (modified to use "bars" as the unit of measure)
In addition to the above inputs, the script will also support the same output data points that are found on the bot settings page, which are:
Assistant
✅ Balance
✅ Max amount for bot usage (Based on current rate)
✅ Max safety order price deviation
✅ % of available balance to be used by the bot
Table (Used amount for each step)
✅ Order No.
✅ Deviation %
✅ Order Size (Base currency)
✅ Order Volume (Quote currency)
✅ Price
✅ Average price
✅ Required price
✅ Required change
✅ Total Size (Base currency)
✅ Total Volume (Quote currency)
What does it do and how does it do it?
When applied to the chart for the first time, the default settings will work to execute the "Open new trade asap" deal start condition using a take profit of 4%, a base order size of 1.335% of equity (initial capital + net profit), a safety order size of 2.003% of equity (initial capital + net profit), a safety order volume scale of 1.5, a safety order step scale of 1.21, and a max safety trades count of 8. With these settings, as you scroll through the chart's history you should see price action crossing the DCA layers (denoted with blue triangles), and a green take-profit price line will render (with green triangle denoting the crossings). Lastly, in the upper-right corner of the chart the table of DCA statistics will render showing you all the gathered data that took place since the chart's starting history until the current time.
Using the "TV Custom Signal" section will allow you to "link" other chart indicators to supply "Start" and "Close" signals for the script. For example, here's how you can use the standard RSI indicator to generate an entry signal:
1) Add the stock RSI indicator and configure it to your desire.
2) Select the "RSI" indicator in the "Chart/Indicator Data Point" input.
3) Select "Chart/Indicator Data Point" in the "Start Deal When" input.
4) Select "Less Than" in the "Is" input.
5) Select "Custom Value(s)" in the "The Value Of" input.
6) Enter "25" in the "Custom Value 1 (Single or Lower Bound)" input.
7) Select "Trading View Custom Signal" in the "Open new trade" input (in the DEAL START CONDITION section).
8) Lastly, check the checkbox with a horizontal straight line above the "Start Deal When" input.
This means that the indicator will start a deal when the "RSI indicator" is "Less Than" the value of "25".
Strategy Results
The default settings are designed to ensure that the indicator will render chart elements when first loaded as well as to allow the backtester to gather order executions and display performance summary. The chart above is is using $10,000 initial capital, a commission rate of 0.1% for both entries and exits, and a 1 tick slippage setting. It is also using 3.22581% of the equity for the Base Order Size, 6.45161% of equity for the first Safety Order Size. The Maximum Safety Trade Count is 4 with a Safety Order Volume Scale of 2, a Safety Order Step Scale of 1.53, Price Deviation To Option Safety Orders at 5.3, and a take profit of 4.5% with Trailing turned on at a deviation of 1.5%. All other settings are defaults.
It is recommended that the indicator be "tuned" for your specific market in order to best implement the strategy and obtain better desirable results. You do so by using the backtester and statistics table and observe the output values and learn how the indicator is performing in the chart history. Using this information, you can adjust the settings accordingly until you find the settings acceptable to your trading goals and risk tolerance.
Always keep in mind that past performance may not be indicative of future results. Settings that seem favorable for one market may be found to be disastrous in another. Therefore, do take the time needed to understand how the settings will behave with the given chart symbol.
Enjoy! 😊👍
How to obtain access to the script?
You have two choices:
Use the "Website" link below to obtain access to this indicator, or
Send us a private message (PM) in TradingView itself.
在腳本中搜尋"the script"
3Commas DCA Bot Strategy v1.0Introduction
The strategy attempts to implement a majority all of the settings found on the 3Commas DCA Bot setting page that can be implemented within a TradingView indicator. Specifically, it will implement the "Open new trade ASAP" and "Trading View Custom Signal" deal start conditions. In this way, you can leverage the power of TradingView's backtester to model your settings and analysis past performance as well as leverage TradingView's alert notification subsystem to send Deal Start and Close signals to 3Commas using almost any of the thousands of scripts found in the Public Library (see "What does it do and how does it do it?" section below for more information on how to do this using the RSI indicator as an example).
How is it original and useful?
This strategy is unique in that it's the only one (as of the initial publications) that can handle 28 out of 32 bot settings (88% coverage) that are found on the 3Commas bot settings page. In addition, because it is a TradingView script, you will benefit from the following:
Model your bot's configuration using the backtester on any timeframe and evaluate its performance using the chart's history.
View a table of detailed statistics pertaining to deals started and completed, win/loss rates, daily P&L, true max drawdown, and detailed statistics on bars in deal along with safety orders filled.
View a table of "Used amount for each step" as presented in 3Commas as well.
Ability to link to almost any TradingView chart indicator that provides a single data point for buy/sell signals.
Make use of the 3Commas TA Start Conditions indicator to emulate the 3Commas built-in indicators for further performance evaluation with the backtester.
How does it compare to other scripts in the Public Library?
This strategy offers a very detailed, comprehensive settings and maybe the only one (as of the initial publication) that can handle 28 out of the 32 bot settings that are found on the 3Commas bot settings page (that can be handled within TradingView, because some cannot be modeled due to chart and language constraints). Specifically, the following 3Commas bot settings and inputs are addressed with asterisks denoting specific limitation due to TradingView's platform architecture and/or constraints:
Main settings
✅ Name
❌ Exchange* (Not handled since it is inherited from chart)
⚠ Bot type* (Only Single-pair because you simply apply the indicator to as many pairs you desire in separate charts to simulate a Multi-pair setting)
Pairs
❌ Pairs* (Not handled since it is inheriting the symbol from the chart)
Strategy
✅ Strategy
❌ Profit currency* (Not handled since there is no equivalence in TradingView)
✅ Base order size / unit
✅ Safety order size / unit
✅ Start order type
Deal start condition
⚠ TradingView* (You can modify the "Technical Rating" indicator by TradingView to output a signal yourself like @TheTradingParrot has done in the TV signal for DCA backtest script)
⚠ QFL* (See Quickfingers Luc's Base Breaking Strategy v2.5 - 3Commas Edition for an alternative)
❌ Manually/API* (Not handled since there is no equivalence in TradingView)
✅ Trading View custom signal
✅ Open new trade asap
Take profit
✅ Take profit (%)
✅ Take profit type
✅ Trailing
⚠ Trailing deviation* (modified to handle TradingView's broker emulator properly)
Stop loss
✅ Stop Loss (%)
✅ Stop Loss action
⚠ Stop Loss timeout* (modified to use "bars" as the unit of measure)
Safety orders
✅ Max safety trades count (a total of 100 safety orders are supported!)
⚠ Max active safety trades count* (Not handled since there is no equivalence in TradingView)
✅ Price deviation to open safety orders (% from initial order)
✅ Safety order volume scale
✅ Safety order step scale
Advanced settings
✅ Don't start deal(s) if the daily volume is less than
✅ Minimum price to open deal
✅ Maximum price to open deal
⚠ Deal start delay (QFL and standard TV signals only)* (modified to use "bars" as the unit of measure)
✅ Cooldown between deals
✅ Open deals & stop
Close deal after timeout
⚠ The time after which, deal will be closed automatically* (modified to use "bars" as the unit of measure)
In addition to the above inputs, the script will also support the same output data points that are found on the bot settings page, which are:
Assistant
✅ Balance
✅ Max amount for bot usage (Based on current rate)
✅ Max safety order price deviation
✅ % of available balance to be used by the bot
Table (Used amount for each step)
✅ Order No.
✅ Deviation %
✅ Order Size (Base currency)
✅ Order Volume (Quote currency)
✅ Price
✅ Average price
✅ Required price
✅ Required change
✅ Total Size (Base currency)
✅ Total Volume (Quote currency)
What does it do and how does it do it?
When applied to the chart for the first time, the default settings will work to execute the "Open new trade asap" deal start condition using a take profit of 4%, a base order size of 1.335% of equity (initial capital + net profit), a safety order size of 2.003% of equity (initial capital + net profit), a safety order volume scale of 1.5, a safety order step scale of 1.21, and a max safety trades count of 8. With these settings, as you scroll through the chart's history you should see price action crossing the DCA layers (denoted with blue triangles), and a green take-profit price line will render (with green triangle denoting the crossings). Lastly, in the upper-right corner of the chart the table of DCA statistics will render showing you all the gathered data that took place since the chart's starting history until the current time.
Using the "TV Custom Signal" section will allow you to "link" other chart indicators to supply "Start" and "Close" signals for the script. For example, here's how you can use the standard RSI indicator to generate an entry signal:
1) Add the stock RSI indicator and configure it to your desire.
2) Select the "RSI" indicator in the "Chart/Indicator Data Point" input.
3) Select "Chart/Indicator Data Point" in the "Start Deal When" input.
4) Select "Less Than" in the "Is" input.
5) Select "Custom Value(s)" in the "The Value Of" input.
6) Enter "25" in the "Custom Value 1 (Single or Lower Bound)" input.
7) Select "Trading View Custom Signal" in the "Open new trade" input (in the DEAL START CONDITION section).
8) Lastly, check the checkbox with a horizontal straight line above the "Start Deal When" input.
This means that the indicator will start a deal when the "RSI indicator" is "Less Than" the value of "25".
Strategy Results
The default settings are designed to ensure that the indicator will render chart elements when first loaded as well as to allow the backtester to gather order executions and display performance summary. The chart above is is using $10,000 initial capital, a commission rate of 0.1% for both entries and exits, and a 1 tick slippage setting. It is also using 3.22581% of the equity for the Base Order Size, 6.45161% of equity for the first Safety Order Size. The Maximum Safety Trade Count is 4 with a Safety Order Volume Scale of 2, a Safety Order Step Scale of 1.53, Price Deviation To Option Safety Orders at 5.3, and a take profit of 4.5% with Trailing turned on at a deviation of 1.5%. All other settings are defaults.
It is recommended that the indicator be "tuned" for your specific market in order to best implement the strategy and obtain better desirable results. You do so by using the backtester and statistics table and observe the output values and learn how the indicator is performing in the chart history. Using this information, you can adjust the settings accordingly until you find the settings acceptable to your trading goals and risk tolerance.
Always keep in mind that past performance may not be indicative of future results. Settings that seem favorable for one market may be found to be disastrous in another. Therefore, do take the time needed to understand how the settings will behave with the given chart symbol.
Enjoy! 😊👍
How to obtain access to the script?
You have two choices:
Use the "Website" link below to obtain access to this indicator, or
Send us a private message (PM) in TradingView itself.
TradeChartist Tracker™𝗧𝗿𝗮𝗱𝗲𝗖𝗵𝗮𝗿𝘁𝗶𝘀𝘁 𝗧𝗿𝗮𝗰𝗸𝗲𝗿 is an essential real-time multi Indicator tracking toolkit that can be plotted as a standalone Indicator plot, a multi symbol tracker/screener for upto 10 different symbols and a visual scorecard for upto 5 different symbols. The indicators included in the tracker are Stochastic Oscillator, RSI, CCI, 15 different Moving Averages, MACD, Bollinger Bands %B (including Bollinger Bands and Breakout Signals), Ichimoku Cloud (including Breakout signals), Donchian Channels Oscillator (including Donchian Channels and Breakout Signals), Net Volume and Heikin Ashi Trend.
===================================================================================================================
™𝗧𝗿𝗮𝗱𝗲𝗖𝗵𝗮𝗿𝘁𝗶𝘀𝘁 𝗧𝗿𝗮𝗰𝗸𝗲𝗿 𝗨𝘀𝗲𝗿 𝗠𝗮𝗻𝘂𝗮𝗹
=====================================
™TradeChartist Tracker Plot Types
==============================
1. Indicator plot of Chart Symbol on its own , chosen from the 𝗜𝗻𝗱𝗶𝗰𝗮𝘁𝗼𝗿 𝗧𝘆𝗽𝗲 dropdown, enabling 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝).
In this example Daily chart of XRP-USDT, 55 period Stochastic is tracked for the chart symbol XRP-USDT.
2. Indicator plot of a Symbol different from the Chart Symbol , chosen from the 𝗜𝗻𝗱𝗶𝗰𝗮𝘁𝗼𝗿 𝗧𝘆𝗽𝗲 dropdown by enabling Tʀᴀᴄᴋ ᴀɴᴏᴛʜᴇʀ Sʏᴍʙᴏʟ's Iɴᴅɪᴄᴀᴛᴏʀ and entering the symbol name in the Sʏᴍʙᴏʟ ᴛᴏ Tʀᴀᴄᴋ input box, whilst keeping 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) enabled.
In this example Daily chart of XRP-USDT, 55 period Stochastic is tracked for the BTC-USD (different from chart symbol XRP-USDT).
3. Tracker Plot of up to 10 Multiple Symbol Trackers for the Indicator chosen from the 𝗜𝗻𝗱𝗶𝗰𝗮𝘁𝗼𝗿 𝗧𝘆𝗽𝗲 dropdown, by disabling 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) and by entering the number of trackers required in the 𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐓𝐫𝐚𝐜𝐤𝐞𝐫𝐬 input box under 𝗧𝗿𝗮𝗰𝗸𝗲𝗿 𝗣𝗹𝗼𝘁𝘀 section. Upto 10 Symbols can be tracked and can be input by the user in the input boxes from Sʏᴍʙᴏʟ 1,...Sʏᴍʙᴏʟ 10 . 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) must be disabled for this plot type.
In this example Daily chart of Crypto Total Market Cap, Bollinger Bands %B is tracked for the chart symbol + 10 other Crypto symbols using Multi Symbol Trackers
4. Visual Scorecards of up to 5 Symbols for 8 indicators (all except Net Volume and HA Trend) can be plotted with real-time data by enabling 𝗗𝗶𝘀𝗽𝗹𝗮𝘆 𝗩𝗶𝘀𝘂𝗮𝗹 𝗦𝗰𝗼𝗿𝗲𝗰𝗮𝗿𝗱 - (𝟓 𝐓𝐫𝐚𝐜𝐤𝐞𝐫𝐬 𝐋𝐢𝐦𝐢𝐭). 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) must be disabled for this plot type.
For the same example Daily chart of Crypto Total Market Cap as above, Visual Scorecard is plotted for 5 Symbols as shown.
5. Indicator Tracker labels can be plotted on Price chart by overlaying the Tracker on main chart and by switching from Separate Tracker Pane - Default to Tracker Labels only on Price Scale in the Lᴀʙᴇʟs Dɪsᴘʟᴀʏ Tʏᴘᴇ dropdown box.
In this example chart of 1hr XLM-USDT, Tracker labels of 55 EMA are plotted for 10 different symbols along with the 55 EMA plot of XLM-USDT.
Indicator plot that doesn't fit on price scale can be visualised using a second Tracker added to chart as shown in the ETH-USDT example below tracking Net Volume.
===================================================================================================================
𝗜𝗻𝗱𝗶𝗰𝗮𝘁𝗼𝗿𝘀 𝗜𝗻𝗰𝗹𝘂𝗱𝗲𝗱 𝗶𝗻 ™𝗧𝗿𝗮𝗱𝗲𝗖𝗵𝗮𝗿𝘁𝗶𝘀𝘁 𝗧𝗿𝗮𝗰𝗸𝗲𝗿
==============================================
1. Stochastic Oscillator
2. RSI
3. CCI
4. MA - (15 types included)
5. MACD
6. Bollinger Bands %B + Optional plots of Bollinger Bands and Breakout Signals
7. Ichimoku Cloud Oscillator + Optional plots of Ichimoku Cloud and Breakout Signals
8. Donchian Channels + Optional plots of Donchian Channels and Breakout Signals
9. Net Volume
10. Heikin Ashi Trend
All of the above indicators can be plotted as independent plots of the Chart Symbol or of a different symbol by enabling 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝). Some Oscillators have the option of Pʟᴏᴛ Sᴛʏʟᴇ under their relevant sections, and can be plotted as line, area or a histogram.
Oscillators 1-8 (except 4) require source price, lookback length and smoothing (where available) for the indicator plot. The colour of the tracker blocks is based on the Upper/Lower bands (where available), specified by the user in the respective sections. For example, if the RSI indicator is chosen to be plotted with Upper band at 60 and Lower band at 40, the tracker blocks and the Indicator plot paint the values between 40 and 60 in neutral colour which can be changed from the settings.
Multi Window BTC-USDT 1hr example chart below with various indicators from ™TradeChartist Tracker.
Note: The tracker colour is exactly colour of the Indicator Plot. The Visual Scorecard , however uses the mid values and doesn't take into account the bands specified by the user. For example, RSI score is green on the Visual Scorecard as long as RSI is above 50 and doesn't get affected by the user specified upper/lower band and this applies to all Oscillators. This is shown in the 1hr BTC-USDT chart below.
Moving Averages (MA) and MACD
------------------------------------------------------
Tracker plots and tracks one of 15 Moving Averages that can be chosen from the MA ᴛʏᴘᴇ and by specifying the MA Lᴇɴɢᴛʜ .
MACD uses EMA as default for calculating the MACD plots and Tracker data using Fᴀsᴛ Lᴇɴɢᴛʜ , Sʟᴏᴡ Lᴇɴɢᴛʜ and Sᴍᴏᴏᴛʜɪɴɢ . To experiment or use a different Moving Average to calculate MACD, disable 𝐔𝐬𝐞 𝐄𝐌𝐀 (Uɴᴄʜᴇᴄᴋ ᴛᴏ ᴜsᴇ MA ғʀᴏᴍ ᴀʙᴏᴠᴇ) and select the required Moving Average from MA ᴛʏᴘᴇ drop down of the 𝟰. 𝗠𝗼𝘃𝗶𝗻𝗴 𝗔𝘃𝗲𝗿𝗮𝗴𝗲 section.
Bollinger Bands %B + Optional plots of Bollinger Bands and Breakout Signals
---------------------------------------------------------------------------------------------------------------------------
Bollinger Bands %B is a companion oscillator for Bollinger Bands and helps depict where the price is, in relation to the Bollinger Bands. To plot the actual Bollinger Bands, enable Dɪsᴘʟᴀʏ Bᴏʟʟɪɴɢᴇʀ Bᴀɴᴅs and to plot the Bollinger Bands Breakout Signals, enable Sʜᴏᴡ BB Bʀᴇᴀᴋᴏᴜᴛ Sɪɢɴᴀʟs , with 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) enabled.
Ichimoku Cloud Oscillator + Optional plots of Ichimoku Cloud and Breakout Signals
------------------------------------------------------------------------------------------------------------------------------------
Ichimoku Cloud Oscillator helps visualize the current price in relation to the breakout support/resistance of the Ichimoku Cloud using strict Ichimoku Cloud criteria (including Chikou Span agreeing with the breakout etc.). To plot the actual Ichimoku Cloud, enable Dɪsᴘʟᴀʏ Iᴄʜɪᴍᴏᴋᴜ Cʟᴏᴜᴅ and to plot the Kumo Breakout Signals, enable Sʜᴏᴡ Kᴜᴍᴏ Bʀᴇᴀᴋᴏᴜᴛ Sɪɢɴᴀʟs , with 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) enabled.
Cloud Settings form the fundamental factor for this indicator to detect the breakouts. The settings for the Ichimoku Cloud is Automatic (detects right settings for the symbol type) by default, but this can be changed to Classic or 24/7 Crypto , based on the user preference from the settings under 𝐂𝐥𝐨𝐮𝐝 𝐓𝐲𝐩𝐞, which also includes a manual input option. Ichimoku traders can experiment different settings combinations under manual settings to suit their trading frequency and timeframe traded.
Donchian Channels + Optional plots of Donchian Channels and Breakout Signals
-------------------------------------------------------------------------------------------------------------------------------
Donchian Channels comprises of three plots - a upper band, a lower band and a mean line (or mid line of the channel). The upper band is based on highest high of N periods specified by the user and the lower band is based on the lowest low of N periods specified by the user. These channels help spot price breaching high or low of last N periods clearly, thereby aiding the trader to understand the price action of any symbol better on any given timeframe.
Donchian Channels Oscillator helps visualize the current price in relation to the Mean line of the Donchian Channels of user specified lookback period (specified in the Dᴏɴᴄʜɪᴀɴ Cʜᴀɴɴᴇʟ Lᴇɴɢᴛʜ input box). The sensitivity of the oscillator can be adjusted using smoothing factor in the Sᴍᴏᴏᴛʜɪɴɢ input box. To plot the actual Donchian Channels, enable Dɪsᴘʟᴀʏ Dᴏɴᴄʜɪᴀɴ Cʜᴀɴɴᴇʟs and to plot the Donchian Channels Breakout Signals, enable Sʜᴏᴡ DC Bʀᴇᴀᴋᴏᴜᴛ Sɪɢɴᴀʟs , with 𝐃𝐢𝐬𝐩𝐥𝐚𝐲 𝐈𝐧𝐝𝐢𝐜𝐚𝐭𝐨𝐫 𝐏𝐥𝐨𝐭 (𝐝𝐢𝐬𝐚𝐛𝐥𝐞𝐬 𝐓𝐫𝐚𝐜𝐤𝐞𝐫/𝐒𝐜𝐨𝐫𝐞𝐜𝐚𝐫𝐝) enabled.
Note: Using smoothing factor more than 1 doesn't reflect the actual Donchian Channels Mean line and also impacts the Tracker block colours.
Net Volume and Heikin Ashi Trend
-------------------------------------------------------
Net Volume and Heikin Ashi Trend can be tracked and plotted for up to 10 symbols in addition to the chart symbol, but both Net Volume and Heikin Ashi Trend are not included in the Visual Scorecard. Since the colour of the Net Volume depends on candle being bullish or bearish, it can help the user visualize if the current candle close of the symbol tracked is above or below the symbols's candle open.
Note: Bar Replay doesn't update the bar by bar indicator plot for historic bars for symbols other than the chart symbol. However, the Indicator Plot is perfectly usable for the realtime bar as data updates for both the Trackers and the Scorecard in realtime.
===================================================================================================================
𝗩𝗶𝘀𝘂𝗮𝗹 𝗦𝗰𝗼𝗿𝗲𝗰𝗮𝗿𝗱
=================
Visual Scorecard plots a green Bull or a red Bear Score colour plot for each Indicator from RSI to Donchian Channels Oscillator against every symbol tracked for up to 5 symbols max (First 5 symbols under 𝗧𝗿𝗮𝗰𝗸𝗲𝗿 𝗣𝗹𝗼𝘁𝘀 section). The gap between the scores can be adjusted using gap factor under Gᴀᴘ Fᴀᴄᴛᴏʀ ʙᴇᴛᴡᴇᴇɴ Sᴄᴏʀᴇs dropdown.
Visual Scorecard scoring method
----------------------------------------------------
RSI > 50 - 🟢
RSI < 50 - 🔴
Stoch > 50 - 🟢
Stoch < 50 - 🔴
CCI > 0 - 🟢
CCI < 0 - 🔴
Close price above MA plot - 🟢
Close price below MA plot - 🔴
MACD > 0 - 🟢
MACD < 0 - 🔴
Bollinger Bands %B > 50 - 🟢
Bollinger Bands %B < 50 - 🔴
Ichimoku Bullish Kumo Trend - 🟢
Ichimoku Bearish Kumo Trend - 🔴
Donchian Channels Oscillator > 0 (or close price above DC Mean Line) - 🟢
Donchian Channels Oscillator < 0 (or close price below DC Mean Line) - 🔴
Note: Bar Replay doesn't update the bar by bar scores/tracker data for historic bars for symbols other than the chart symbol. However, the Scorecard is perfectly usable for the realtime bar as data updates for both the Trackers and the Scorecard in realtime.
===================================================================================================================
𝗠𝘂𝗹𝘁𝗶 𝗦𝘆𝗺𝗯𝗼𝗹 𝗧𝗿𝗮𝗰𝗸𝗲𝗿𝘀/𝗟𝗮𝗯𝗲𝗹𝘀
=============================
Multi Symbol Tracker blocks continuously track the real-time indicator data of up to 10 symbols (in addition to the chart symbol) based on the number of Symbol Trackers preferred in the 𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐒𝐲𝐦𝐛𝐨𝐥 𝐓𝐫𝐚𝐜𝐤𝐞𝐫𝐬 (𝟎-𝟏𝟎) input box under the 𝗧𝗿𝗮𝗰𝗸𝗲𝗿 𝗣𝗹𝗼𝘁𝘀 section, and plots Bull, Bear and Neutral colour coded blocks based on both the indicator selected and settings preferred by the user under the relevant indicator section.
Multi Symbol Tracker Labels also continuously track the real-time indicator data in addition to the last close price (if 𝐒𝐡𝐨𝐰 𝐏𝐫𝐢𝐜𝐞 is enabled under 𝗧𝗿𝗮𝗰𝗸𝗲𝗿 𝗣𝗹𝗼𝘁𝘀 section), which helps user see the real-time changes in the indicator values and price changes of the symbols tracked.
The Tracker Label colours are exactly the same as the Tracker Block colours and are filtered based on the user preferred bands on the Oscillator values. This is slightly different to the Visual Scorecard Colour coding as the range between the user preferred bands is colour coded in a neutral colour, whereas the Scorecard uses only Bull and Bear Colours as explained in the 𝗩𝗶𝘀𝘂𝗮𝗹 𝗦𝗰𝗼𝗿𝗲𝗰𝗮𝗿𝗱 heading above. For example, if the user prefers RSI upper band of 60 and lower band of 40, the range between the values of 40 and 60 will be colour coded in neutral colour which can be changed from the 𝗨𝘀𝗲𝗳𝘂𝗹 𝗘𝘅𝘁𝗿𝗮𝘀 section of the indicator settings.
Note 1: Default settings are based on the Oscillator mid values and hence the Tracker Blocks match with the Visual Scorecard colour codes. Using Upper and Lower bands for oscillators help spot the oversold and overbought zones and also helps spot breakout threshold based on Indicator values specified by the user. Example chart with visual depiction below using RSI.
Note 2: Bar Replay doesn't update the bar by bar scores/tracker data for historic bars for symbols other than the chart symbol. However, the Tracker blocks/labels are perfectly usable for the realtime bar as data updates for both the Trackers and the Scorecard in realtime.
===================================================================================================================
Frequently Asked Questions
========================
Q: When I load the ™TradeChartist Tracker, why are the values in the labels blurred sometimes?
A: This happens occasionally as shown in the chart below, when the script is loaded for the first time or when a different setting is used.
To resolve this, just hide and unhide the script using the 👁 next to the Indicator title. If it is not visible, just hover the mouse/crosshair over the Indicator Title and it will be visible.
Q: Why does the indicator plot, tracker blocks and labels of Symbols being tracked, not update when I use Bar Replay?
A: As explained in the relevant sections above, historic data for bars and indicators other than chart symbol doesn't update on bar replay. But the chart symbol data does update for every bar on bar replay. This doesn't affect the real-time values and block colours for the symbols tracked.
Q: Can I track real-time values of a currently trading symbol when I'm on a symbol chart that is inactive? For example, can I see labels with real-time BTC values on a Sunday when I'm on a SPX chart when its not in session?
A: Simple answer is no. This is because, the plots are based on bar times of the chart and the symbols are tracked based on the bar time. So if the SPX session ended on Friday, the last known value of the BTC labels will be from Friday and hence it is always recommended to track symbols from a symbol chart that is in session.
Q: Does ™TradeChartist Tracker repaint?
A: This indicator doesn't repaint but it is not recommended to trade a different symbol from the chart based on the real-time data alone without checking if the current symbol chart is in session as inactive price chart will not have updated data on symbols tracked. Also, bar replay doesn't work on data pulled from external symbol data than the chart symbol, but signals confirmed at candle close and confirmed by Tracker blocks with appropriate colour code will be in agreement with the respective indicator and can be double checked for building trust and confidence on the indicator.
Q: Can ™TradeChartist Tracker be connected to other indicators as external source?
A: Yes. ™TradeChartist Tracker can be connected to another script and there are several use cases in doing so. A couple of examples are shown below.
1. ™TradeChartist Tracker 's Bollinger Bands %B 𝗜𝗻𝗱𝗶𝗰𝗮𝘁𝗼𝗿 𝗣𝗹𝗼𝘁 connected to ™TradeChartist Plotter to plot Divergences on the 4hr XAU-USD main price chart.
2. ™TradeChartist Tracker 's 𝐁𝐫𝐞𝐚𝐤𝐨𝐮𝐭 𝐓𝐫𝐞𝐧𝐝 𝐈𝐝𝐞𝐧𝐭𝐢𝐟𝐢𝐞𝐫 connected to ™TradeChartist Plug and Trade as Oscillatory Signal with 0/0 to generate trade signals with Targets and performance information on trades.
More Example Charts
==================
===================================================================================================================
Best Practice: Test with different settings first using Paper Trades before trading with real money
===================================================================================================================
This is not a free to use indicator. Get in touch with me (PM me directly if you would like trial access to test the indicator)
Premium Scripts - Trial access and Information
Trial access offered on all Premium scripts.
PM me directly to request trial access to the scripts or for more information.
===================================================================================================================
Malaysia Structured Warrants (Local Equities) ScreenerThis is an indicator script that showed the various performance of numerous companies call/put warrants that was issued by investment bank and institutions with limited numbers of warrants showed within the script.
This script was built to monitor and observe the past and current trend on all of the call/put warrants linked securities listed in Bursa Malaysia in term of the premium percentage , gearing ratio , unit price , periodic volume and time to maturity (still under process).
Besides, it was built to utilize users time to review the basic data regarding with those call/put warrants as the script will show numbers of them instead of requiring changing on graph to observe each basic data.
To simplify it , it is somehow like the KLSE Screener Warrant Side but this script has all the previous records and data that can be view in glance and download in the format of CSV (only in premium account).
To example used is UWC , but this script can apply to any malaysia stock that have the call warrants (like SUPERMX , MYEG , MI, FGV ,TOPGLOV and etc.)
It is still a prototype and manual update with newly issued of call/put warrants are required to add within this script time by time. There are also few technical issues regarding with this scripts as the labels are most times which i have contact with the customer service regarding this problem.
Overall, I speak as the author and copyright owner of this scripts, this script wouldn’t update by itself when new relevant structured warrants are issued but the update should provide based on my personal time planning.
Author : J.L.Z.H
You are free to leave your tradingview id below if you like to have a few days of access permission.
[PX] External LevelHello everyone,
today I'd like to share a script, which enables you to use external logic to plot levels on your chart.
How does it work?
The concept is based on two scripts. One script, which uses an external input as a trigger to print a new level and one script that calculates an output, which will be fetched.
Sounds complicated? It really is not! Let's take a closer look.
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © paaax
//@version=4
study("RSI OS/OB")
l = input(14, "RSI Length")
ob = input(70, "Overbought")
os = input(30, "Oversold")
r = rsi(close, l)
hline(ob)
hline(os)
plot(r, "RSI", color=color.orange)
// The following plot produces an output, which will be fetched the "External Level"-script.
// It evaluates to one of the following three values: 1.0, -1.0 or 0.0
plot(crossover(r, ob) ? 1.0 : crossunder(r, os) ? -1.0 : 0.0, "Output", transp=100)
The example script above uses an RSI and two threshold levels (70 and 30). The logic here is, that whenever the RSI is crossing down the lower threshold or crossing up the upper threshold we'd consider the current movement to be either oversold or overbought. Therefore, it's a point of interest, which we could visualize with a level.
The script creates an output when the crossover or crossunder of a threshold happens. A crossover would result in a value of 1.0, a crossunder in a value of -1.0. In all other cases the value would be 0.0.
The output of the RSI script would then be used as an input of the External Level script, which has a "Source"-parameter in its input-section. If the fetched input shows 1.0, then the script prints a resistance level. If it shows -1.0 a support level will be printed. And that's basically it. A very simple approach to print levels on your chart with an infinite number of use cases.
For example, you could use fetch outputs from a MACD script, MA script, outputs based on volume or price movement. Just remember the output has to evaluate to either 1.0 or -1.0 and has to be selected in the input-section.
Hope that might be useful to some of you :)
Please click the "Like"-button and follow me for future open-source script publications.
If you are looking for help with your custom PineScript development, don't hesitate to contact me directly here on Tradingview or through the link in my signature :)
Trend Lines ProHello Traders!
We need to make things better & better to solve the puzzle and I try to do my best on this way. now I am here with my new Trend Lines Pro script.
As you know, Trend Lines is very subjective and many people (even professionals) draw different Trend Lines on the same chart. This is confusing and there must be an automation to make the life easer. with this tool I tried to automate it.
The idea in this script is different from my previous trend lines scripts. In this, I use channel idea so it can check number of pivot points it contains, it checks H/L/C in the channels as well. it also checks the angle while choosing trend lines. then we get stronger and useful Trend Lines automatically.
There are some option in the script, let see one by one:
Pivot Period: The Length to calculate Pivot Highs/Lows
Source : Option to use "High/Low" or "Close" as the source for Pivot Points
Threshold Rate : This rate is used for channel width. it you give bigger numbers then you get bigger channels. it's 4 by default
Minimum Angle Rate for new Trendline: if there are different trend lines, there must be an angle between them to choose best trend lines. you can set the angle with this option.
Minimum Strength: there can be many trend lines but we need to choose/use stronger ones. with this option you can set the number of pivot points a trend channel have to contains.
Maximum Loopback Length: by default the script can check 40 pivot highs and 40 pivot lows but to make the script faster and useful I needed to add a limitation for the number of bars that the script can go back.
Show Trendlines as: you can see trend lines as "Trendline", "Channel", "Trend Channel". you can see examples below.
Enable Weak Trend Lines: if there is no trend lines strong enough (as defined in "Minimum Strength" option) you have option to see a weak trend line. that is useful sometimes. if you enable this option weak lines are shown as dotted lines.
Show Price Labels on Trendlines: the script can show the price levels to break trend lines. the examples are below
Line Style: trend lines can be Solid or Dashed as you wish
Color theme: colors of the Up/Down Trend lines can be set. 'Red', Lime, Blue, White, Black, Olive, Gray
you can see the Trend Lines as channels:
you can see Trend Channels to see the big picture.also there is dotted trend line as weak trend line defined above.
you can set color/width of trend lines as you wish.
the script is fast enough to run on 1sec chart:
you can use this script on any chart, fx pairs, stocks, indices etc
I made a short video to explain how to use it and some options:
Please PM for access.
Enjoy!
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
TradeChartist Plug and Trade™TradeChartist Plug and Trade is an extremely useful indicator that can be connected to almost any Study script (not a Strategy) on Trading View (with an Oscillatory or Non-Oscillatory Signal plot) to generate Trade Signals with Stop Loss plot, user set or automatic Target plots and create Alerts based on Past Performance, determined by Past Gains/Drawdowns for each Trade. The indicator is packed with a lot of features including TradeChartist's signature Dashboard and Real-time Gains Tracker, Automatic Targets Generator, Take Profit recommendation, option to paint price bars based on Trade/Price Trend, 3 types of Stop Loss plots to choose from, with option for user to set fixed Target to take profits.
1. How does ™TradeChartist Plug and Trade connect to another Study script/indicator signal?
Plug and Trade is elegantly designed with simplicity in mind, without compromising on functionality, so any trader - beginner to advanced, can just plug an external signal to the indicator with ease by just following these simple steps.
Add to price chart, the Indicator along with the signal plot to be tested and assessed for performance.
Plug the signal into ™TradeChartist Plug and Trade by choosing it from the Plug Signal Here drop-down.
Choose Signal type as Oscillatory if signal oscillates between set values or crosses a certain value periodically (Example: RSI, CCI, TRIX etc that are mostly not overlayed on Price chart and may be in a separate pane from price chart as it may not fit on Price scale), Choose Signal Type as Non Oscillatory if the signal can be plotted on price scale and Trades are normally generated when price crosses above or below it (Moving Averages, SAR indicators like SuperTrend, etc.).
For oscillators, default Oscillator value for Trade Signals is 0 as most Oscillators have 0 as their mid point. The value can be changed if the Signal doesn't oscillate with 0 as its mid point. For example, if the connected Signal is RSI, the values can be changed to Upper and Lower band values to generate Trade Signals.
Plot the Signal on chart if the signal is Non Oscillatory.
2. How can the plugged Signal's performance be assessed using ™TradeChartist Plug and Trade and subsequently used for generating Trade Entries and to create Alerts?
Once the Signal is plugged into the indicator based on steps above, Plug and Trade automatically plots the Trade entries based on the Signal type.
Plot Trade Entries after Bar Close from settings can be checked for signals that do not confirm until bar close. By doing this, repainting can be avoided for most signals and true performance can be assessed. Also, alerts can be created using Once Per Bar rather than Once Per Bar Close .
The real-time Gains Tracker and Dashboard are useful in tracking gains and other useful indicator values like RSI, Stoch, ATR and EMA in real-time with price movement.
Enabling Past Performance from settings will plot Maximum Gains achieved and Maximum Drawdown for each trade as labels . Trading View only plots finite number of labels and old labels are deleted automatically. But to access past performance beyond the last available label, bar replay can be used.
User can choose from 3 types of Stop Losses from the settings - Fixed %, Trailing % and ATR Stop Loss namely and a Fixed TP % to create plots on price chart and to create alerts.
If the user prefers automatic targets based on Trade entries, Recommend Targets can be enabled from the settings. The automatic targets are generated at the time of Trade Entry, along with Target prices and % which turn green when hit.
Each BUY and SELL Trade are tracked in its entirety and the highest high since BUY and lowest low since SELL are plotted on the price chart and also displayed on the Plug and Play Dashboard
Choppiness can be easily spotted if there are numerous Past Performance labels or several Trade Entries around a short timeframe on chart. This may mean that the signal needs smoothing or may not be suitable for the asset to trade on the chart timeframe. Suitability of a Study script for the asset can be determined in many ways using this indicator.
3. What other features are included in ™TradeChartist Plug and Trade?
Enabling Spot Price Bars to take Profit option from settings automatically plots $ sign above/below candles where Profit taking is recommended or Stop Loss moved to secure profits/reduce loss.
Enabling Paint Price Bars with Trade Trend paints price bars with colors that help picture Trade/Price trend. Trend spotting using this works best with (bars/hollow candles/candles with no border) on dark background.
Both features work on Price chart even without any Signal plugged in.
===================================================================================================================
Example Charts using different Signals plugged into ™TradeChartist Plug and Trade
1. RSI Signal (Oscillatory) plugged in with >60 for BUYs and <40 for SELLs - BTC-USDT on 1hr
2. PowerTracer Signal (Oscillatory) plugged in - GBP-USD 1hr
3. 55 period VWMA Signal (Non Oscillatory) plugged in - ADA-USDT 4hr
4. RSI Signal (Oscillatory) plugged in with >70 for BUYs and <30 for SELLs - SPX 1hr with Trailing SL - 3% and TP - 2%
===================================================================================================================
This is not a free to use indicator. Get in touch with me (PM me directly if you would like trial access to test the indicator)
Premium Scripts - Trial access and Information
Trial access offered on all Premium scripts.
PM me directly to request trial access to the scripts or for more information.
===================================================================================================================
Expansion Top/Bottom (Expo) Expansion Top/Bottom (Expo)
DESCRIPTION
Expansion Top/Bottom (Expo) indicator is a powerful oscillator that visualizes temporary Top/Bottom as well as trend shifts. When the market moves boldly a histogram will be formed in the indicator which indicates that the movement might be at its end. It's always a great idea to lock in some profit when we get these histograms. These ‘Lock-in’ profits points are visualized by a cross.
The professional trader has the ability to adjust the length of the calculation. A longer length means that the indicator spots broader market shifts. A short length means that the indicator spots temporary tops/bottoms.
Use the indicator in combination with other signals and analysis techniques.
HOW TO USE
1. Use the indicator to identify temporary tops/bottoms.
2. Use the indicator to identify broader tops/bottoms.
3. Use the indicator to visualize the trend.
4. Use the indicator to visualize ‘Lock-In’ profit points.
INDICATOR IN ACTION
Short length (Length = 14)
BTCUSD
EURUSD
BRENT
BRENT
BTCUSD
Long length (Length = 50)
BRENT
EURUSD
BTCUSD
The indicator works with RENKO, HEIKIN ASHI and with KAGI charts as well.
I hope you find this indicator useful, and please comment or contact me if you like the script or have any questions/suggestions for future improvements. Thanks!
I will continue to work on this indicator, so please share your experience and feedback with me so that I can continuously improve it. Thanks to everyone that have contacted me regarding my scripts. Your feedback is valuable for future developments!
ACCESS THE INDICATOR
• Contact me on TradingView or use the links below.
• I have started to publish private scripts which are not visible on my profile. However, if you're interested to know more about these scripts, drop me a message at my webpage and I will show you these scripts as well. The rationale behind publishing these scrips as private is that I don't want them to be indexed in search engines.
-----------------
Disclaimer
Copyright by Zeiierman.
The information contained in my scripts/indicators/ideas does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, or individual’s trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My scripts/indicators/ideas are only for educational purposes!
How to avoid repainting when NOT using security()Even when your code does not use security() calls, repainting dynamics still come into play in the realtime bar. Script coders and users must understand them and, if they choose to avoid repainting, need to know how to do so. This script demonstrates three methods to avoid repainting when NOT using the security() function.
Note that repainting dynamics when not using security() usually only come into play in the realtime bar, as historical data is fixed and thus cannot cause repainting, except in situations related to stock splits or dividend adjustments.
For those who don’t want to read
Configure your alerts to trigger “Once Per Bar Close” and you’re done.
For those who want to understand
Put this indicator on a 1 minute or seconds chart with a live symbol. As price changes you will see four of this script’s MAs (all except the two orange ones) move in the realtime bar. You are seeing repainting in action. When the current realtime bar closes and becomes a historical bar, the lines on the historical bars will no longer move, as the bar’s OHLC values are fixed. Note that you may need to refresh your chart to see the correct historical OHLC values, as exchange feeds sometimes produce very slight variations between the end values of the realtime bar and those of the same bar once it becomes a historical bar.
Some traders do not use signals generated by a script but simply want to avoid seeing the lines plotted by their scripts move during the realtime bar. They are concerned with repainting of the lines .
Other traders use their scripts to evaluate conditions, which they use to either plot markers on the chart, trigger alerts, or both. They may not care about the script’s plotted lines repainting, but do not want their markers to appear/disappear on the chart, nor their alerts to trigger for a condition that becomes true during the realtime bar but is no longer true once it closes. Those traders are more concerned with repainting of signals .
For each of the three methods shown in this script’s code, comments explain if its lines, markers and alerts will repaint or not. Through the Settings/Inputs you will be able to control plotting of lines and markers corresponding to each method, as well as experiment with the option, for method 2, of disabling only the lines plotting in the realtime bar while still allowing the markers and alerts to be generated.
An unavoidable fact is that non-repainting lines, markers or alerts are always late compared to repainting ones. The good news is that how late they are will in many cases be insignificant, so that the added reliability of the information they provide will largely offset the disadvantages of waiting.
Method 1 illustrates the usual way of going about things in a script. Its gray lines and markers will always repaint but repainting of the alerts the marker conditions generate can be avoided by configuring alerts to trigger “Once Per Bar Close”. Because this gray marker repaints, you will occasionally see it appear/disappear during the realtime bar when the gray MAs cross/un-cross.
Method 2 plots the same MAs as method 1, but in green. The difference is that it delays its marker condition by one bar to ensure it does not repaint. Its lines will normally repaint but its markers will not, as they pop up after the condition has been confirmed on the bar preceding the realtime bar. Its markers appear at the beginning of the realtime bar and will never disappear. When using this method alerts can be configured to trigger “Once Per Bar” so they fire the moment the marker appears on the chart at the beginning of the realtime bar. Note that the delay incurred between methods 1 and 2 is merely the instant between the close of a realtime bar and the beginning of the next one—a delay measured in milliseconds. Method 2 also allows its lines to be hidden in the realtime bar with the corresponding option in the script’s Settings/Inputs . This will be useful to those wishing to eliminate unreliable lines from the realtime bar. Commented lines in method 2 provide for a 2b option, which is to delay the calculation of the MAs rather than the cross condition. It has the obvious inconvenient of plotting delayed MAs, but may come in handy in some situations.
Method 3 is not the best solution when using MAs because it uses the open of bars rather than their close to calculate the MAs. While this provides a way of avoiding repainting, it is not ideal in the case of MA calcs but may come in handy in other cases. The orange lines and markers of method 3 will not repaint because the value of open cannot change in the realtime bar. Because its markers do not repaint, alerts may be configured using “Once Per Bar”.
Spend some time playing with the different options and looking at how this indicator’s lines plot and behave when you refresh you chart. We hope everything you need to understand and prevent repainting when not using security() is there.
Look first. Then leap.
Range Bar Gaps DetectorRange Bar Gaps Detector
Overview
The Range Bar Gaps Detector identifies price gaps across multiple range bar sizes (12, 24, 60, and 120) on any trading instrument, helping traders spot potential support/resistance zones or breakout opportunities. Designed for Pine Script v6, this indicator detects gaps on range bars and exports data for use in companion scripts like Range Bar Gaps Overlap, making it ideal for multi-timeframe gap analysis.
Key Features
Multi-Range Gap Detection: Identifies gaps on 12, 24, 60, and 120-range bars, capturing both bullish (gap up) and bearish (gap down) price movements.
Customizable Sensitivity: Includes a user-defined minimum deviation (default: 10% of 14-period SMA) for 12-range gaps to filter out noise.
7-Day Lookback: Automatically prunes gaps older than 7 days to focus on recent, relevant price levels.
Data Export: Serializes up to 10 gaps per range (tops, bottoms, start bars, highest/lowest prices, and age) for seamless integration with overlap analysis scripts.
Debugging Support: Plots gap counts and aggregation data in the Data Window for easy verification of detected gaps.
How It Works
The indicator aggregates price movements to simulate higher range bars (24, 60, 120) from a base range bar chart. It detects gaps when the price jumps significantly between bars, ensuring gaps meet the minimum deviation threshold for 12-range bars. Gaps are stored in arrays, serialized for external use, and pruned after 7 days to maintain efficiency.
Usage
Add to your range bar chart (e.g., 12-range) to detect gaps across multiple ranges.
Use alongside the Range Bar Gaps Overlap indicator to visualize gaps and their overlaps as boxes on the chart.
Check the Data Window to confirm gap counts and sizes for each range (12, 24, 60, 120).
Adjust the "Minimal Deviation (%) for 12-Range" input to control gap detection sensitivity.
Settings
Minimal Deviation (%) for 12-Range: Set the minimum gap size for 12-range bars (default: 10% of 14-period SMA).
Range Sizes: Fixed at 24, 60, and 120 for higher range bar aggregation.
Notes
Ensure the script is published under your TradingView username (e.g., GreenArrow2005) for use with companion scripts.
Best used on range bar charts to maintain consistent gap detection.
For advanced overlap analysis, pair with the Range Bar Gaps Overlap indicator to highlight zones where gaps from different ranges align.
Ideal For
Traders seeking to identify key price levels for support/resistance or breakout strategies.
Multi-timeframe analysts combining gap data across various range bar sizes.
Developers building custom indicators that leverage gap data for advanced charting.
Black–Scholes model - Options premium calculatorBlack-Scholes Options Pricing Calculator in Pine Script Introduction
The Black-Scholes model is one of the most widely used mathematical models for pricing options. It provides a theoretical estimate of the price of European-style options based on factors such as the underlying asset price, strike price, time to expiration, volatility, risk-free rate, and option type.
This Pine Script implementation of the Black-Scholes options pricing model enables traders to calculate call and put option prices directly within TradingView, helping them assess potential trades more efficiently.
What Does This Script Do?
This script allows traders to input essential option parameters and instantly calculate both call and put option prices using the Black-Scholes formula. It provides:
• A user-friendly interface for inputting option parameters.
• Automatic computation of option prices.
• Real-time updates as market data changes.
Key Features:
• Uses the Black-Scholes formula to compute European call and put option prices.
• User-defined inputs for stock price, strike price, time to expiration, volatility, and risk-free rate.
• Displays calculated option prices on the TradingView chart.
Understanding the Black-Scholes Formula:
The Black-Scholes model is given by the following equations:
C=S0N(d1)−Xe−rtN(d2)C = S_0 N(d_1) - Xe^{-rt} N(d_2) P=Xe−rtN(−d2)−S0N(−d1)P = Xe^{-rt} N(-d_2) - S_0 N(-d_1)
Where:
• CC = Call option price
• PP = Put option price
• S0S_0 = Current stock price
• XX = Strike price
• rr = Risk-free interest rate
• tt = Time to expiration (in years)
• σ\sigma = Volatility of the stock (annualized)
• N(x)N(x) = Cumulative standard normal distribution
• d1d_1 and d2d_2 are given by:
d1=ln(S0/X)+(r+σ2/2)tσtd_1 = \frac{ \ln(S_0/X) + (r + \sigma^2/2)t }{ \sigma \sqrt{t} } d2=d1−σtd_2 = d_1 - \sigma \sqrt{t}
This script implements these calculations efficiently in Pine Script to help traders quickly determine fair values for options based on current market conditions.
Example Calculation:
(The following example values were true at the time of publishing this script. Option prices fluctuate constantly, so actual values may vary.)
• Underlying asset price (NIFTY): 23,519.35
• ATM Call Strike Price: 23,500
• ATM Put Strike Price: 23,550
• IV (Implied Volatility) for Call Option: 8.1%
• IV (Implied Volatility) for Put Option: 10.1%
• Expiry Date: April 3, 2025
Using the Black-Scholes model, the calculated theoretical prices are:
• Theoretical ATM CE price: ₹129
• Theoretical ATM PE price: ₹118
For comparison, the actual option prices from the option chain table at the time of writing were:
• Actual ATM CE price: ₹139.70
• Actual ATM PE price: ₹120.30
As we can see, there is a larger difference between the theoretical price and actual market price for the ATM Call option compared to the ATM Put option.
If you're an experienced trader, you likely know how to use this kind of information to identify potential market inefficiencies or trading opportunities.
How to Use This Script:
1. Add the script to your TradingView chart.
2. Input the necessary parameters such as stock price, strike price, volatility, risk-free rate, and time to expiration.
3. View the calculated call and put option prices directly on the chart.
This Black-Scholes options pricing calculator provides a convenient way to compute theoretical option prices within TradingView. It helps traders analyse whether an option is fairly priced based on market conditions.
While the Black-Scholes model has its limitations (e.g., it does not account for early exercise of American options or dividend payments), it remains a powerful tool for European-style options pricing and a foundational concept in financial markets.
A handy little tool! Unfortunately, this script requires manual data entry since automatic data capture is currently not possible. If this ever becomes feasible in the future, an updated version will be released.
Try it out and let me know your feedback!
Disclaimer:
Please note that this is only for study/educational purpose and is just one of the many tools a trader may use.
Use it at your own risk.
Regards!
Watchlist & Symbols Distribution [Daveatt]TLDR;
I got bored so I just coded the TradingView watchlist interface in Pinescript :)
TLDR 2:
Sharing it open-source what took me 1 full day to code - haven't coded in Pinescript in a long time, so I'm a bit slow for now :)
█ OVERVIEW
This script offers a comprehensive market analysis tool inspired by TradingView's native watchlist interface features.
It combines an interactive watchlist with powerful distribution visualization capabilities and a performance comparison panel.
The script was developed with a focus on providing multiple visualization methods while working within PineScript's limitations.
█ DEVELOPMENT BACKGROUND
The pie chart implementation was greatly inspired by the ( "Crypto Map Dashboard" script / )
adapting its circular visualization technique to create dynamic distribution charts. However, due to PineScript's 500-line limitation per script, I had to optimize the code to allow users to switch between pie chart analysis and performance comparison modes rather than displaying both simultaneously.
█ SETUP AND DISPLAY
For optimal visualization, users need to adjust the chart's display settings manually.
This involves:
Expanding the indicator window vertically to accommodate both the watchlist and graphical elements
Adjusting the Y-axis scale by dragging it to ensure proper spacing for the comparison panel grid
Modifying the X-axis scale to achieve the desired time window display
Fine-tuning these adjustments whenever switching between pie chart and comparison panel modes
These manual adjustments are necessary due to PineScript's limitations in controlling chart scaling programmatically. While this requires some initial setup, it allows users to customize the display to their preferred viewing proportions.
█ MAIN FEATURES
Distribution Analysis
The script provides three distinct distribution visualization modes through a pie chart.
Users can analyze their symbols by exchanges, asset types (such as Crypto, Forex, Futures), or market sectors.
If you can't see it well at first, adjust your chart scaling until it's displayed nicely.
Asset Exchanges
www.tradingview.com
Asset Types
Asset Sectors
The pie charts feature an optional 3D effect with adjustable depth and angle parameters. To enhance visual customization, four different color schemes are available: Default, Pastel, Dark, and Neon.
Each segment of the pie chart includes interactive tooltips that can be configured to show different levels of detail. Importantly, the pie chart only visualizes the distribution of selected assets (those marked with a checkmark in the watchlist), providing a focused view of the user's current interests.
Interactive Watchlist
The watchlist component displays real-time data for up to 10 user-defined symbols. Each entry shows current price, price changes (both absolute and percentage), volume metrics, and a comparison toggle.
The table is dynamically updated and features color-coded entries that correspond to their respective performance lines in the comparison chart. The watchlist serves as both an information display and a control panel for the comparison feature.
Performance Comparison
One of the script's most innovative features is its performance comparison panel.
Using polylines for smooth visualization, it tracks the 30-day performance of selected symbols relative to a 0% baseline.
The comparison chart includes a sophisticated grid system with 5% intervals and a dynamic legend showing current performance values.
The polyline implementation allows for fluid, continuous lines that accurately represent price movements, providing a more refined visual experience than traditional line plots. Like the pie charts, the comparison panel only displays performance lines for symbols that have been selected in the watchlist, allowing users to focus on their specific assets of interest.
█ TECHNICAL IMPLEMENTATION
The script utilizes several advanced PineScript features:
Dynamic array management for symbol tracking
Polyline-based charting for smooth performance visualization
Real-time data processing with security calls
Interactive tooltips and labels
Optimized drawing routines to maintain performance
Selective visualization based on user choices
█ CUSTOMIZATION
Users can personalize almost every aspect of the script:
Symbol selection and comparison preferences
Visual theme selection with four distinct color schemes
Pie chart dimensions and positioning
Tooltip information density
Component visibility toggles
█ LIMITATIONS
The primary limitation stems from PineScript's 500-line restriction per script.
This constraint necessitated the implementation of a mode-switching system between pie charts and the comparison panel, as displaying both simultaneously would exceed the line limit. Additionally, the script relies on manual chart scale adjustments, as PineScript doesn't provide direct control over chart scaling when overlay=false is enabled.
However, these limitations led to a more focused and efficient design approach that gives users control over their viewing experience.
█ CONCLUSION
All those tools exist in the native TradingView watchlist interface and they're better than what I just did.
However, now it exists in Pinescript... so I believe it's a win lol :)
Order Block Overlapping Drawing [TradingFinder]🔵 Introduction
Technical analysis is a fundamental tool in financial markets, helping traders identify key areas on price charts to make informed trading decisions. The ICT (Inner Circle Trader) style, developed by Michael Huddleston, is one of the most advanced methods in this field.
It enables traders to precisely identify and exploit critical zones such as Order Blocks, Breaker Blocks, Fair Value Gaps (FVGs), and Inversion Fair Value Gaps (IFVGs).
To streamline and simplify the use of these key areas, a library has been developed in Pine Script, the scripting language for the TradingView platform. This library allows you to automatically detect overlapping zones between Order Blocks and other similar areas, and visually display them on your chart.
This tool is particularly useful for creating indicators like Balanced Price Range (BPR) and ICT Unicorn Model.
🔵 How to Use
This section explains how to use the Pine Script library. This library assists you in easily identifying and analyzing overlapping areas between Order Blocks and other zones, such as Breaker Blocks and Fair Value Gaps.
To add "Order Block Overlapping Drawing", you must first add the following code to your script.
import TFlab/OrderBlockOverlappingDrawing/1
🟣 Inputs
The library includes the "OBOverlappingDrawing" function, which you can use to detect and display overlapping zones. This function identifies and draws overlapping zones based on the Order Block type, trigger conditions, previous and current prices, and other relevant parameters.
🟣 Parameters
OBOverlappingDrawing(OBType , TriggerConditionOrigin, distalPrice_Pre, proximalPrice_Pre , distalPrice_Curr, proximalPrice_Curr, Index_Curr , OBValidGlobal, OBValidDis, MitigationLvL, ShowAll, Show, ColorZone) =>
OBType (string)
TriggerConditionOrigin (bool)
distalPrice_Pre (float)
proximalPrice_Pre (float)
distalPrice_Curr (float)
proximalPrice_Curr (float)
Index_Curr (int)
OBValidGlobal (bool)
OBValidDis (int)
MitigationLvL (string)
ShowAll (bool)
Show (bool)
ColorZone (color)
In this example, various parameters are defined to detect overlapping zones and draw them on the chart. Based on these settings, the overlapping areas will be automatically drawn on the chart.
OBType : All order blocks are summarized into two types: "Supply" and "Demand." You should input your Current order block type in this parameter. Enter "Demand" for drawing demand zones and "Supply" for drawing supply zones.
TriggerConditionOrigin : Input the condition under which you want the Current order block to be drawn in this parameter.
distalPrice_Pre : Generally, if each zone is formed by two lines, the farthest line from the price is termed Pervious "Distal." This input receives the price of the "Distal" line.
proximalPrice_Pre : Generally, if each zone is formed by two lines, the nearest line to the price is termed Previous "Proximal" line.
distalPrice_Curr : Generally, if each zone is formed by two lines, the farthest line from the price is termed Current "Distal." This input receives the price of the "Distal" line.
proximalPrice_Curr : Generally, if each zone is formed by two lines, the nearest line to the price is termed Current "Proximal" line.
Index_Curr : This input receives the value of the "bar_index" at the beginning of the order block. You should store the "bar_index" value at the occurrence of the condition for the Current order block to be drawn and input it here.
OBValidGlobal : This parameter is a boolean in which you can enter the condition that you want to execute to stop drawing the block order. If you do not have a special condition, you should set it to True.
OBValidDis : Order blocks continue to be drawn until a new order block is drawn or the order block is "Mitigate." You can specify how many candles after their initiation order blocks should continue. If you want no limitation, enter the number 4998.
MitigationLvL : This parameter is a string. Its inputs are one of "Proximal", "Distal" or "50 % OB" modes, which you can enter according to your needs. The "50 % OB" line is the middle line between distal and proximal.
ShowAll : This is a boolean parameter, if it is "true" the entire order of blocks will be displayed, and if it is "false" only the last block order will be displayed.
Show : You may need to manage whether to display or hide order blocks. When this input is "On", order blocks are displayed, and when it's "Off", order blocks are not displayed.
ColorZone : You can input your preferred color for drawing order blocks.
🟣 Output
Mitigation Alerts : This library allows you to leverage Mitigation Alerts to detect specific conditions that could lead to trend reversals. These alerts help you react promptly in your trades, ensuring better management of market shifts.
🔵 Conclusion
The Pine Script library provided is a powerful tool for technical analysis, especially in the ICT style. It enables you to detect overlapping zones between Order Blocks and other significant areas like Breaker Blocks and Fair Value Gaps, improving your trading strategies. By utilizing this tool, you can perform more precise analysis and manage risks effectively in your trades.
Supertrend Alert with Arrows and Time FilterOverview
This script is designed to generate trading signals based on the Supertrend indicator, a popular technical analysis tool. The Supertrend indicator is used to identify the direction of the market trend and potential reversal points.
Supertrend Settings
The script uses two sets of Supertrend settings:
Small Supertrend
Factor: 3.0
ATR Period: 10
Big Supertrend
Factor: 10.0
ATR Period: 30
These settings are fixed and should not be altered to maintain the integrity of the signal generation process.
Configurable Parameters
startHour: The hour at which signal generation begins.
endHour: The hour at which signal generation ends.
These parameters allow users to focus on specific trading hours, optimizing the signal relevance to their trading strategy.
Signal Types
The script generates two types of signals:
Type 1: Reversal Signal
Long Signal: Triggered when the big Supertrend is in an uptrend, and the small Supertrend transitions from a downtrend to an uptrend.
Short Signal: Triggered when the big Supertrend is in a downtrend, and the small Supertrend transitions from an uptrend to a downtrend.
Type 2: Trend Change Signal
Long Signal: Triggered when the big Supertrend changes from a downtrend to an uptrend.
Short Signal: Triggered when the big Supertrend changes from an uptrend to a downtrend.
How the Script Works
Initialization: The script initializes with predefined Supertrend settings.
Data Input: Market data (e.g., price data) is fed into the script.
Supertrend Calculation: The script calculates the Supertrend values using the predefined factors and ATR periods.
Signal Detection: The script monitors the Supertrend values and detects the defined signals based on the conditions mentioned above.
Time Filtering: Signals are filtered based on the specified startHour and endHour, ensuring only relevant signals are displayed within the desired timeframe.
Usage
Set Parameters: Define startHour and endHour according to your trading schedule.
Run Script: Execute the script with market data input.
Interpret Signals: Monitor the generated signals and use them to inform your trading decisions.
Originality
Dual Supertrend Usage: The use of both a small and a big Supertrend to generate signals adds a layer of complexity and reliability to the signals.
Time-Based Filtering: Allows traders to focus on specific trading hours, enhancing the relevance and accuracy of signals.
Two Signal Types: The combination of reversal signals and trend change signals provides comprehensive market insights.
Conclusion
This Supertrend Signal Generator is a robust tool for traders seeking to leverage the Supertrend indicator for more informed trading decisions. By combining dual Supertrend settings and configurable trading hours, the script offers unique and flexible signal generation capabilities.
Waves MultiTimeframe AlfredThe price on the charts moves quite chaotically, but when we look at a given interval (and eliminate the noise created on the lower interval), we can distinguish trend price movements up and down. They are almost never a straight line, but the price reaches higher and higher lows - we have up trend or lower and lower highs when we have a down trend.
There are many theories trying to describe trend movements, and many trend change detectors have been created on their basis.
In last centry we we had few famous researchers of investment theories, one of them was the Japanese journalist and investor Goichi Hosoda, creator of Ichimoku trading theory.
Goichi Hosoda proposed a trend change detector called Kyushu Legs. This detector compares the values of the current price with the price from 9 weeks ago and illustrates them using a candlestick chart. Than on the chart we can distinguishes B, P, Y formations that allow us to determine the trend and notify about trend change moment. This idea was developed further. The set of Kyushu Legs formations (B, P, Y) has been transferred to raw price chart and transformed into a set of rules detecting trend changes on the current price chart. A unique feature this method is the comparison of the parameters of neighboring candles in order to dynamically determine the values beyond which the trend changes. This eliminate the need of predefined threshold values and adjusting it to different price ranges.
Described trend detector is available on TradingView under the name "Waves" and was a starting point of a whole package of "Waves" scripts built around this detector.
"Waves MultiTimeframe Alfred" is part of the "Waves" package. It is an extension of trend detector with the ability to analyze in parallel candle data taken from higher intervals. Thanks to that this detector detects moments of trend changes on many intervals at once.
In top-right corner it displays a window with basic informations about trend (and potencial trend change moment) at higher intervals, such as:
- Trend direction confirmed on last closed candle
- In real time trend direction with the assumption that candle will be closes at current price level.
- Time to current candle close
- Price change done by the current candle
- Price's distance to the trend change threshold
Trend direction and potencial trend change are shown with a symbols:
↗ - Continuation of up trend
↘ - Continuation of down trend
↺ - Trend change to up trend
↷ - Trend change to down trend
This script supports 2 trend detection rulesets:
- Low - More sensitive trend detection ruleset, detects changes faster and more often than Medium, announcing potential changes in the Medium trend
- Medium - Less sensitive trend detection ruleset detecting trends on the chart.
Remember, until candle is not close price can move and trend indication can change. All trend indicators have a delay and are describing past till now. Future prediction cannot be done by software.
This script can be used alone, but the creator's intention was to use it together with other scripts from the "Waves" package. e.g. It can be used with the "Waves" script which draw trend lines and trend change moments on the current interval and we can use "Waves MultiTimeframe Alfred" as an assistant showing basic trends situation on up to 3 higher intervals.
Script settings:
Timeframe 1,2,3 - Option to pick 3 higher timeframes with text and background color settings.
Timer - Showing count down timer to the end of current bar on that interval
Candles - Showing candle symbol with current price change done on that interval. A separate candle color can be picked for price up and down candles.
Low wave row - Row with low trend symbol and price distance to the current low trend threshold (trend change price).
↗ - Continuation of up trend
↘ - Continuation of down trend
↺ - Trend change to up trend
↷ - Trend change to down trend
Low wave last bar symbol - Symbol of trend confirmed by previous bar. Drawn in the first line before interval symbol:
↗ - up trend
↘ - down trend
Mid wave row - Row with mid trend symbol and price distance to the current mid trend threshold (trend change price).
↗ - Continuation of up trend
↘ - Continuation of down trend
↺ - Trend change to up trend
↷ - Trend change to down trend
Mid wave last bar symbol - Symbol of trend confirmed by previous bar. Drawn in the first line after interval symbol:
↗ - up trend
↘ - down trend
Warnings - Showing explanation messages when interval data are not available.
Signal change - Experimental option to signal trend change with a different color.
Troubleshooting:
In case of any problems, please send error details to the author of the script.
dashboard MTF,EMA User Guide: Dashboard MTF EMA
Script Installation:
Copy the script code.
Go to the script window (Pine Editor) on TradingView.
Paste the code into the script window.
Save the script.
Adding the Script to the Chart:
Return to your chart on TradingView.
Look for the script in the list of available scripts.
Add the script to the chart.
Interpreting the Table:
On the right side of the chart, you will see a table labeled "EMA" with arrows.
The rows correspond to different timeframes: 5 minutes (5M), 15 minutes (15M), 1 hour (1H), 4 hours (4H), and 1 day (1D).
Understanding the Arrows:
Each row of the table has two columns: "EMA" and an arrow.
"EMA" indicates the trend of the Exponential Moving Average (EMA) for the specified period.
The arrow indicates the direction of the trend: ▲ for bullish, ▼ for bearish.
Table Colors:
The colors of the table reflect the current trend based on the comparison between fast and slow EMAs.
Blue (▲) indicates a bullish trend.
Red (▼) indicates a bearish trend.
Table Theme:
The table has a dark (Dark) or light (Light) theme according to your preference.
The background, frame, and colors are adjusted based on the selected theme.
Usage:
Use the table as a quick indicator of trends on different timeframes.
The arrows help you quickly identify trends without navigating between different time units.
Designed to simplify analysis and avoid cluttering the chart with multiple indicators.
Premium Volatility Breakout Strategy [wbburgin]This the premium version of my Volatility Breakout strategy, which improves significantly on the original strategy (publicly available on my profile). Improvements are below. A note about any of my premium scripts: I will continue updating and improving the original (public) versions.
This strategy is not built for any specific asset or timeframe, and has been backtested on crypto, equities, and forex from 1min - 1day. However, I recommend using it on more volatile assets because it is a breakout strategy.
********** My Background
I am an investor, trader, and entrepreneur with 10 years of cryptocurrency and equity trading experience and founder of two fintech startups. I am a graduate of a prestigious university in the United States and carry broad and inclusive interests in mathematical finance, computer science, machine learning / artificial intelligence, as well as other fields.
**********
Improvements over the original Volatility Breakout strategy include:
Faster Trend Detection → The Premium Volatility Breakout strategy will catch trends faster by using adaptive volatility-weighted bands instead of standard-width volatility-weighted bands. This can improve win size and has performed well in my backtesting.
ADX Filter → False breakouts dampen the overall results of the original script, as well as the % profitable,so an ADX filter has been programmed into the script (toggle on/off in settings). This filter will only enter long and short trades when the ADX is above a certain threshold. This is by default toggled off because in most instances it will not be necessary, but in certain environments may be useful.
MA Configuration → Different types of moving averages and weights are now configurable in the settings. These can change the responsiveness of the strategy.
External Trend Filter → I use this strategy as a filter for some of my low-timeframe algorithms. I have added an external trend filter (a plot only displayed in the data window) that will return “1” when the trend is long and “-1” when the trend is short (displayed on-chart with red and green trend curves).
Customizable Alert Messages In-Strategy → In the settings, there will be text boxes where you can create your own alerts. All you will need to do is create an alert in the alert panel on TradingView and leave the message box blank - if you fill out the alert boxes in the settings, these will automatically populate into your alerts. There are in total four different customizable alerts messages: Entry and Exit alerts for both Long and Short sides. If you disable stop loss and/or take profit, these alerts will also be disabled. Similarly, if you disable shorts, all short alerts will be disabled.
About stop losses: This strategy does not come with a stop loss because the moving average acts as a stop loss / trade exit for both long and short entries.
**********
Display
You can turn off highlighting or barcolor in the settings. Additionally, future updates may include a color scheme for users using a light-themed window.
**********
Configuring Alerts
In TradingView desktop, go to the ‘Alerts’ tab on the right panel. Click the “+” button to create a new alert. Select this strategy for the condition and one of the two options that includes alert() function calls. Name the alert what you wish and clear the default message, because your text in the settings will replace this message.
Now that the alert is configured, you can go to the settings of the strategy and fill in your chosen text for the specific alert condition. You will need to check “Long and Short” in the “Trade Direction” setting in order for any Short Alerts to become active.
**********
Disclaimer
Copyright by wbburgin.
The information contained in my Scripts/Indicators/Algorithms does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Pro Trading Art - Head And ShouldersHow the Script Works:
1. The script identifies potential Head and Shoulders patterns by searching for specific pivot highs and pivot lows in the price data.
2. It checks for the presence of a left shoulder, head, and right shoulder based on the conditions defined in the script.
3. If a valid Head and Shoulders pattern is found, the script plots lines and labels on the chart to visualize the pattern.
4. The script also identifies Inverted Head and Shoulders patterns using similar logic but with different conditions.
5. It plots lines and labels for the Inverted Head and Shoulders pattern.
6. The script generates short and long conditions based on the patterns. Short conditions trigger when the close price crosses below the neck level of a Head and Shoulders pattern, while long conditions trigger when the close price crosses above the neck level of an Inverted Head and Shoulders pattern.
7. It plots sell and buy signal shapes on the chart when the short and long conditions are met, respectively.
8. The script can also trigger alerts to notify the user when a valid Head and Shoulders or Inverted Head and Shoulders pattern is detected.
9. The script provides visual cues on the chart to help users identify potential trading opportunities.
10. The logic and parameters of the script can be modified by the user to customize the behavior and adapt it to different trading strategies.
How Users Can Make Profit Using This Script:
1. Identify potential short-selling opportunities: When a valid Head and Shoulders pattern is detected and a short condition is met, it indicates a potential trend reversal. Traders can consider opening short positions to profit from a downward price movement.
2. Identify potential long-buying opportunities: When a valid Inverted Head and Shoulders pattern is detected and a long condition is met, it suggests a potential trend reversal. Traders can consider opening long positions to profit from an upward price movement.
3. Combine with additional analysis: Users can utilize this script as a tool in their overall trading strategy. They can combine the signals generated by the script with other technical indicators, fundamental analysis, or market sentiment to make more informed trading decisions.
4. Define appropriate entry and exit points: Traders can use the lines and labels plotted by the script to determine entry and exit points for their trades. For example, they may choose to enter a short position after the price crosses below the neck level and exit when the price reaches a predetermined target or when the pattern is invalidated.
5. Set risk management measures: It is important for users to implement proper risk management strategies when trading based on the script's signals. They should define stop-loss orders to limit potential losses if the trade goes against them and consider setting profit targets to secure profits when the trade moves in their favor.
Auto Harmonic Pattern - Backtester [Trendoscope]We are finally here with the implementation of backtesting tool for Auto-Harmonic-Pattern-UltimateX .
CAUTION: THIS IS NOT A STRATEGY AND SHOULD NOT BE FOLLOWED BLINDLY. WE ENCOURAGE USERS TO UTILISE THIS AS BACKTESTING TOOL FOR BUILDING THEIR STRATEGY BASED ON HARMONIC PATTERNS
This script is based on our premium indicator - Auto-Harmonic-Pattern-UltimateX . In this script, along with implementation of scanning harmonic patterns, we provide various options via settings which enables users to build their own strategy based on harmonic patterns, use them with custom coded filters, backtest them on various tickers and timeframes.
Harmonic Patterns is concept and we can trade harmonic pattern in many ways. While general interest around harmonic patterns is to find reversal zones and use them for short term swing trades. But, using it along trend following strategies can also be very rewarding. Here is one of the educational idea I shared about using harmonic patterns for trend following. These are just few possibilities where users can explore further on how they want to trade this. The settings of this script are crafted in such a way that it enables users to explore all these possibilities.
🎲 Components
Chart components of this script is lighter compared to Auto Harmonic Pattern - UltimateX. This is because we want to keep lighter interface in order to support seamless execution of emulator. Since pine strategy framework does most of the things such as calculating profitability, keeping track of trades and results etc, display with respect to - "Closed Trade Stats" are removed from this script and "Open Trade Stats" are made lighter.
🎲 Settings
🎯 Trade Settings : Few important settings under this section are
Due to pine limitations, we will not be able to support both long and short in a same setup. Hence, users need to chose either long or short trade setup.
Entry/Base/Target play important role in defining your strategy.
Confluence is another important factor which lets users use multiple patterns at once as confirmation.
🎯 Zigzag Settings : Zigzag settings determine the size of patterns being formed.
Please note that smaller patterns may not yield very good results and larger patterns may take time to complete trade. Similarly higher depth can cause runtime issues. Recursive zigzag option is alternative to deep search algorithm.
🎯 Filters :
Filters enable users to select trades based on specific conditions. Ability to use external filter even allows writing and using custom filters to be used with this algorithm. Here is a video which explains how this can be done. HOW-TO-Use-external-filters
Pattern filters allow users to pick and chose patterns they want to trade. This can be done either individually or based on category
🎯 Alerts :
Apart from strategy specific alerts, the script also implements customisable alerts via pine alert() function. Alerts can be configured to send upon three conditions
When new pattern is created
When an existing pattern updates entry/stop/target due to safe repaint of D (Only happens when Trail Entry Price is selected)
When a pattern in trade closes either due to hitting stop or target
Important Note: Alerts fired via this method may not match the trades shown on chart as trades which are controlled via pine strategy emulator depends on various other factors such as pyramiding.
Alert template is customisable and users can make use of available placeholders to get dynamic data in alerts. Valid placeholders are
{alertType} - Alert type - New/Update/Close
{id} - Pattern Id
{ticker} - Ticker
{timeframe} - Chart timeframe
{price} - Current price
{patterns} - Identified pattern names
{direction} - Direction - Long/Short
{entry} - Entry Price
{stop} - Stop Price
{target} - Target Price
{orderType} - Limit/Stop - applicable for only New and Update types
{status} - Trade status. Valid values are Pending/Cancelled/Stopped/Success
Template is common for all custom alert types. Hence, updating the template will impact all custom alerts - New/Update/Close
{
"alert" : "{alertType}",
"id" : {id},
"ticker" : "{ticker}",
"timeframe" : "{timeframe}",
"price" : {price},
"patterns" : "{patterns}",
"direction" : "{direction}",
"entry" : {entry},
"stop" : {stop},
"target" : {target},
"orderType" : {orderType}
"status" : {status}
}
Here is a video on how to customise the alerts using templates and placeholders - HOW-TO-Customize-Alerts-With-Placeholders
🎯 Miscellaneous :
These are simple settings to control display and backtest bars. If you are running alerts, we suggest turning of Open Trades and Drawings and limit backtest to minimal value in order to improve efficiency of
🎯 Backtest Engine Parameters :
Default settings are optimised for trend following. Users are encouraged to play around with settings and filters to build strategy out of this tool.
Position sizing is not leveraged. Margin settings makes sure that trades cannot exceed capital.
All measures are taken to avoid repainting. Script does not use request.security and real time bars. This drastically reduces the risk of repainting in scripts.
If you are premium user, please select "Bar Magnifier".
Strategy BackTest Display Statistics - TraderHalaiThis script was born out of my quest to be able to display strategy back test statistics on charts to allow for easier backtesting on devices that do not natively support backtest engine (such as mobile phones, when I am backtesting from away from my computer). There are already a few good ones on TradingView, but most / many are too complicated for my needs.
Found an excellent display backtest engine by 'The Art of Trading'. This script is a snippet of his hard work, with some very minor tweaks and changes. Much respect to the original author.
Full credit to the original author of this script. It can be found here: www.tradingview.com
I decided to modify the script by simplifying it down and make it easier to integrate into existing strategies, using simple copy and paste, by relying on existing tradingview strategy backtester inputs. I have also added 3 additional performance metrics:
- Max Run Up
- Average Win per trade
- Average Loss per trade
As this is a work in progress, I will look to add in more performance metrics in future, as I further develop this script.
Feel free to use this display panel in your scripts and strategies.
Thanks and enjoy :)
Tick travel ⍗This script is a further exploration of 'ticks' (only on realtime - live bars), based on my previous script:
- www.tradingview.com -
What are 'ticks'?
... Once the script’s execution reaches the rightmost bar in the dataset, if trading is currently active on the chart’s symbol,
then Pine indicators will execute once every time an update occurs, i.e., price or volume changes ...
(www.tradingview.com)
This script has 2 parts:
1) Option: ' Tick up/down'
This is a further progression of previous work.
During bar development, every time there is an update (tick), a dot is placed.
If for example there is 1 tick (first of new bar), a dot will be placed on 1,
if it is the 8th tick off that bar, there will be a dot placed on 8.
While my previous script had the issue that there was an upper limit per bar (max 32),
this script (because it is working with labels) can place max 500 dots.
For each bar this is better, it has to be mentioned though that looking in history, once the limit of 500 has been reached,
you'll notice the last ones are being deleted. This is one of the reasons the script is not suitable for higher timeframes
(1h and higher, even higher than 5 minutes can give some issues if it is a highly traded ticker), if a bar would have more
than 500 ticks, they won't be drawn anymore (which is not desirable of course)
2) Option: ' Tick progression'
These are the same ticks, but placed on the candle itself, or you can show the candle:
Or 'without' candle (or 'black' colour):
When 'No candles' are enabled, the 'candles' get the colour at the right.
At the moment it is not possible to drawn between 2 candles, this technique uses labels with 'text',
each tick on a candle will have a 'space' added, so you can see a progression to the right.
Colours
- if price is higher than previous tick price -> green
- if price is lower than previous tick price -> red
- otherwise -> blue (dimmed)
There are options to choose the 'dot', when choosing 'custom',
just enter (copy/paste) your symbol of your choice in the 'custom' field:
Caveats:
- Labels and text will not always be exactly on the price itself
- The scripts needs more testings, possibly some ticks don't always get drawn as they should.
The lower the timeframe, the more possible issues can occur
- Since (candle option) the dots move to the right, the higher the timeframe and/or the more ticks,
the sooner ticks will go in the area of next candle.
That's why I made a separate 'start symbol'
-> This is the very first tick on each candle, then you can zoom in/out more easily until the dots don't merge into each other candle area:
A timeframe higher than 5 minutes mostly won't be feasible I believe
This script wouldn't be possible without the help of @LucF, also because of his script
With very much respect I am hugely inspired by him! Many Thanks to him, Tradingview, and everything associated with them!
Cheers!
The Moon█ OVERVIEW
The Moon is a script that is designed to help Traders analyse their charts using the moon. This script consists of three main features :
1. Moon Phases Pro : This is a more powerful version of the default built-in Moon Phases where it would plot both past cycles and Future cycles with a better accuracy.
2. Moon Lines : This plots the moon's longitude into price. you can also select your desired $/degree ( price vs time unit) to make these lines better suited for your chart and the asset your playing with. We also didn't forget to add an option to enable harmonics of these lines. In addition, you can select "reverse" to get the downtrending plants as well.
3. Moon Angles : This allows you to highlight areas where the moon is at X degree. you can get the Moon at zero aris or 180 degrees or any other degree!.
We also added some styling options to help with the visuals.
█ Future Plans and upgrades to this script may include :
1. Enhanced algorithm for a faster loading/processing script.
2. More future dates plotting.
And more! Feel free to contact me with any feature that you would like to see in this script
█ How to use :
1. Open the settings.
2. Enable your desired tool and adjust the settings.
Give the script a few seconds and you should be set. Don't enable more than 2 tools at the same time, but if you want to do that, you can insert the same script twice or more in your chart.
This script is coded as an addon to the Gann ToolBox package/scripts.
Planetary Aspects & Transits█ OVERVIEW
Planetary Aspects and Transits are commonly used by Astrology Traders and Gann Traders for various reasons. This script is designed to highlight these planetary aspects and transitions on your chart. You can select your favorite planet -including the sun and the moon- and also select the aspect that you would like to view and this script will highlight it on the chart. The aspects that are included to choose from are ( 0, 30, 45, 60, 72, 90, 120, 135, 144, 150, and 180 degrees ). You can also select the mode of these aspects and transits ( Heliocentric vs Geocentric ).
This script offers two running options :
1. Planet vs aspect : using this option you will be able to select a planet and an aspect and we will find/highlight all the transitions vs all the planets in that aspect.
2. Planet vs Planet : using this option you will be able to select two planet and a single aspect to view on the chart.
█ Future Plans and upgrades to this script may include :
1. Enhanced algorithm for a faster loading/processing script.
2. More future dates plotting.
And more! Feel free to contact me with any feature that you would like to see in this script
█ How to use :
1. Open the settings.
2. Choose the planet/planets, and the aspect.
3. Enable the option.
Give the script a few seconds and you should be set.
This script is coded as an addon to the Gann ToolBox package/scripts.